


#ifndef __net_handleH__
#define __net_handleH__

#include "game.h"
#include "net_socket.h"

namespace WtfEngine {
	typedef unsigned	tHandle;
	
	/**
	 * An entry in a socket's handle tree. Points to a 
	 **/
	class LocalHandle {
		static const tHandle	InitialValue = 1 << ((sizeof(tHandle) * 8) - 1);
		
		GameObject::tWeakRef	mwrObject;
		tHandle					mValue;
		
		LocalHandle *			mpLeft;
		LocalHandle *			mpRight;
	};
	
	/**
	 * A handle to an object owned by another node
	 **/
	class RemoteHandle {
		ISocket::tRef	mrSocket;
		tHandle			mValue;
		
		